<!-- messageDetail.jsp -->
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page import="java.time.format.DateTimeFormatter" %>
<%@ page import="java.time.LocalDateTime" %>
<html>
<head>
  <title>留言板详情</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      background-color: #f4f4f9;
      margin: 0;
      padding: 0;
    }
    .container {
      width: 100%;
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px;
      background-color: #fff;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
      border-radius: 8px;
    }
    h2, h3 {
      text-align: center;
      margin-bottom: 20px;
    }
    a {
      text-decoration: none;
      color: #007bff;
    }
    a:hover {
      text-decoration: underline;
    }
    table {
      width: 100%;
      border-collapse: collapse;
      margin-bottom: 20px;
    }
    th, td {
      padding: 12px;
      text-align: left;
      border-bottom: 1px solid #ddd;
    }
    th {
      background-color: #f2f2f2;
    }
    tr:hover {
      background-color: #f1f1f1;
    }
    .message-content {
      margin-top: 20px;
      padding: 20px;
      background-color: #f9f9f9;
      border-radius: 8px;
      border: 1px solid #ddd;
    }
    .back-link {
      display: block;
      text-align: center;
      margin-top: 20px;
    }
  </style>
</head>
<body>
<div class="container">
  <h2>留言板详情</h2>
  <table>
    <tr>
      <th>标题</th>
      <td>${message.title}</td>
    </tr>
    <tr>
      <th>创建时间</th>
      <td>${message.formattedCreatedAt}</td>
    </tr>
    <tr>
      <th>用户</th>
      <td>${message.user.username}</td>
    </tr>
  </table>
  <div class="message-content">
    <h3>留言内容</h3>
    <p>${message.content}</p>
  </div>
  <div class="back-link">
    <a href="messageList">回到留言板列表</a>
  </div>
</div>
</body>
</html>
